﻿#include<iostream>
#include<list>

void test01()
{
	std::list<int> l;
	l.push_back(1);
	l.push_back(2);
	l.push_back(3);
	l.push_back(4);

	//std::cout << l.at(0) << '\n';
	//std::cout << l[0] << '\n';

	std::cout << "第一个元素为：" << l.front() << '\n';
	std::cout << "最后一个元素为：" << l.back() << '\n';
}

int main()
{
	test01();
	return 0;
}
